/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ca.trader.utils;

import ca.trader.user.DoLogout;

/**
 * This class contains all the consts for consts that are common across classes
 * @author Ahsan
 */
public class HttpConsts
{
	 // The length of a session the user is logged:  currently 20 mins
	 public static final int MAX_USER_LOGIN_SESSION_LENGTH = 20 * 60;
	 
	 // The length of how long a user is "remembered" when they choose to remember themselves.
	 // Curently 10 years.
	 public static final int MAX_USER_REMEMBER_COOKIE_AGE = 10 * 365 * 24 * 60 * 60;
	 
	 // Attribute name used in a session. binds to a user's email when they've been authenticated.
	 public static final String SESSION_ATTRIBUTE_AUTHENTICATED_USER_EMAIL = "AuthenticatedUserEmail";
	 
	 // Attribute name used in a session. binds a user's irst name when they've been authenticated.
	 public static final String SESSION_ATTRIBUTE_AUTHENTICATED_USER_FIRST_NAME = "AuthenticatedUserFirstName";
	 
	 // Attribute name used in a session. binds a user's ID when they've been authenticated.
	 public static final String SESSION_ATTRIBUTE_AUTHENTICATED_USER_ID = "AuthenticatedUserID";
	 
	 // Attribute name used in a session. binds a boolean, which tells us whether the user has be
	 public static final String SESSION_ATTRIBUTE_USER_AUTHENTICATED = "Authenticated";
	 
	 // Name for a cookie.  binds to the UUID when the user has "remembered" themselves.  The cookie
	 // contains the UUID which matches a UserLoginHistoryRecord for remembering the user
	 public static final String COOKIE_USER_LOGIN_REMEMBER_UUID = "TraderUID";
	 
	 // JSP page for creating a sale 
	 public static final String CREATE_SALE_JSP_PAGE = "createsale.jsp";
	 
	 // JSP page for registering a user
	 public static final String REGISTER_JSP_PAGE = "register.jsp";
	 
	 // JSP page for logging out a user
	 public static final String LOGOUT_JSP_PAGE = "logout.jsp";
	 
	 // JSP page for the index
	 public static final String INDEX_JSP_PAGE = "index.jsp";
	 
	 // JSP page for logging in a user
	 public static final String LOGIN_JSP_PAGE = "login.jsp";
	 
	 // JSP page for viewing a user's profile
	 public static final String VIEW_USER_PROFILE_JSP_PAGE = "viewuserprofile.jsp";
	 
	 // JSP page for viewing a user's  sals
	 public static final String VIEW_USER_SALES_JSP_PAGE = "viewusersales.jsp";
	 
	 // JSP page for viewing an individual sale
	 public static final String VIEW_SALE_JSP_PAGE = "viewsale.jsp";
	 
	 public static final String VIEW_FAVOURITED_SALES_JSP_PAGE = "viewfavouritedsales.jsp";
	 
	 public static final String SEARCH_SALES_JSP_PAGE = "searchsales.jsp";	 
	 
	 public static final String SEARCH_QUERY_JSP_PAGE = "searchquery.jsp";

	 
	 // Servlet for logging out a user.  
	 public static final String LOGOUT_SERVLET_PAGE = DoLogout.class.getSimpleName();
}
